package com.ruoyi.yyq.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yyq.mapper.CarRescueTypeMapper;
import com.ruoyi.yyq.domain.CarRescueType;
import com.ruoyi.yyq.service.ICarRescueTypeService;

/**
 * 救援类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-10
 */
@Service
public class CarRescueTypeServiceImpl implements ICarRescueTypeService 
{
    @Autowired
    private CarRescueTypeMapper carRescueTypeMapper;

    /**
     * 查询救援类型
     * 
     * @param id 救援类型主键
     * @return 救援类型
     */
    @Override
    public CarRescueType selectCarRescueTypeById(Long id)
    {
        return carRescueTypeMapper.selectCarRescueTypeById(id);
    }

    /**
     * 查询救援类型列表
     * 
     * @param carRescueType 救援类型
     * @return 救援类型
     */
    @Override
    public List<CarRescueType> selectCarRescueTypeList(CarRescueType carRescueType)
    {
        return carRescueTypeMapper.selectCarRescueTypeList(carRescueType);
    }

    /**
     * 新增救援类型
     * 
     * @param carRescueType 救援类型
     * @return 结果
     */
    @Override
    public int insertCarRescueType(CarRescueType carRescueType)
    {
        return carRescueTypeMapper.insertCarRescueType(carRescueType);
    }

    /**
     * 修改救援类型
     * 
     * @param carRescueType 救援类型
     * @return 结果
     */
    @Override
    public int updateCarRescueType(CarRescueType carRescueType)
    {
        return carRescueTypeMapper.updateCarRescueType(carRescueType);
    }

    /**
     * 批量删除救援类型
     * 
     * @param ids 需要删除的救援类型主键
     * @return 结果
     */
    @Override
    public int deleteCarRescueTypeByIds(Long[] ids)
    {
        return carRescueTypeMapper.deleteCarRescueTypeByIds(ids);
    }

    /**
     * 删除救援类型信息
     * 
     * @param id 救援类型主键
     * @return 结果
     */
    @Override
    public int deleteCarRescueTypeById(Long id)
    {
        return carRescueTypeMapper.deleteCarRescueTypeById(id);
    }
}
